'use strict';
const { sep } = require('path');

// 统一平台分隔符： /
function formatPath(path) {
  let result = path;
  if (path) {
    // 分隔符，win => \  mac => /
    if (sep === '\\') {
      result = path.replace(/\\/g, '/');
    }
  }
  return result;
}
module.exports = formatPath;
